--- leafpad-0.8.18.org/src/file.c	2013-10-19 23:33:43.767308069 +0000
+++ leafpad-0.8.18/src/file.c	2013-10-19 23:34:34.263306257 +0000
@@ -223,7 +223,7 @@
 			GTK_MESSAGE_ERROR, _("Can't open file to write"));
 		return -1;
 	}
-	if (fwrite(str, 1, wbytes, fp) != wbytes) {
+	if (fwrite(cstr, 1, wbytes, fp) != wbytes) {
 		run_dialog_message(gtk_widget_get_toplevel(view),
 			GTK_MESSAGE_ERROR, _("Can't write file"));
 		return -1;
